//
//  RandomArrays.java
//  joosVM
//
//  Created by Smári Waage on 21.12.2009.
//  Copyright 2009 smari.org. All rights reserved.
//
package SortingAlgorithms;
public class RandomArrays {

	public static native int getRandomInt();
	
	public static int[] getRandomArray(int size){
		
		int[] arr = new int[size];
		
		for(int i=0;i<size;i++){
			arr[i] = getRandomInt();
		}
		return arr;
	}
	
	public static boolean checkSorting(int[] arr){
	
		int len = arr.length;
		for(int i=0;i<len;i++){
			if(arr[i] > arr[i+1])
				return false;
		}
		return true;
	}
	
}

